package com.easyweb.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

 
import org.hibernate.annotations.ManyToAny;
import org.hibernate.validator.Max;
import org.hibernate.validator.Min;

@Entity
@Table
public class KullaniciBilgisayarBilgileri {

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private Long id;

 
	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private Kullanici kullanici;
	
	@Column(precision=2,scale=0,nullable=false)
	@Min(value=0)
	@Max(value=10)
	private int seviyesi;
	
	public KullaniciBilgisayarBilgileri() {
		// TODO Auto-generated constructor stub
	}

	
	public KullaniciBilgisayarBilgileri(Long id, Kullanici kullanici,
			int seviyesi) {
		super();
		this.id = id;
		this.kullanici = kullanici;
		this.seviyesi = seviyesi;
	}


	public Long getId() {
		return id;
	}

	public Kullanici getKullanici() {
		return kullanici;
	}

	public int getSeviyesi() {
		return seviyesi;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setKullanici(Kullanici kullanici) {
		this.kullanici = kullanici;
	}

	public void setSeviyesi(int seviyesi) {
		this.seviyesi = seviyesi;
	}

	
}
